Skip to content

Comments

防止年久失修#1

Merged
zcg merged 2 commits intobyebye-code:mainfrom
xiaochunkun:main
Oct 29, 2025
Merged

防止年久失修#1
zcg merged 2 commits intobyebye-code:mainfrom
xiaochunkun:main

Conversation

@zcg
Copy link
Contributor

@zcg zcg commented Oct 29, 2025

防止年久失修

小坤 added 2 commits October 27, 2025 14:51
## 主要改动

### 1. 修复 Claude Code patcher 注入位置bug (src/utils/claude_code_patcher.rs)
- **问题**: statusline auto-refresh 代码被错误注入到 if-else 语句中间,导致语法错误
- **原因**: 代码在 xBB() 调用后寻找分号,但实际是在 try-catch 块中用逗号分隔
- **修复**: 改为查找整个 try-catch 块的结束位置 (}});),在块结束后注入
- **效果**: patch 后的 cli.js 语法正确,Claude Code 可以正常运行

### 2. 优化 wrapper 模式无翻译时的 I/O 处理 (src/wrapper/injector.rs)
- **问题**: 无翻译模式下未使用 Stdio::inherit(),导致终端交互异常
- **修复**: 添加 stdin/stdout/stderr 的 inherit 设置
- **效果**: wrapper 模式在不启用翻译时能正常交互

### 3. 添加配置目录自动迁移 (src/main.rs)
- 添加从旧目录 ~/.claude/88code 到新目录 ~/.claude/byebyecode 的自动迁移
- 更新配置路径引用

## 测试结果
- ✅ byebyecode --patch 可以成功修补 cli.js 且不破坏语法
- ✅ byebyecode --wrap 可以正常启动并交互
- ✅ Claude Code 在 patch 后可以正常运行

## 版本
v1.1.11
@zcg zcg merged commit a3d16b9 into byebye-code:main Oct 29, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant